<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
          xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<head  th:replace="top::html">

  <title>添加角色</title>
 
</head>
<body class="fixed hold-transition skin-blue">
<div class="wrapper">

  <!-- Main Header -->

    <div th:replace="tophtml::html" ></div>

  <!-- Left side column. contains the logo and sidebar -->


    <!-- sidebar: style can be found in sidebar.less -->
  
  <div th:replace="left::html" ></div>
  <div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <section class="content-header">
      <h1>
        添加角色
        <small></small>
      </h1>
      <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i> Level</a></li>
        <li class="active">Here</li>
      </ol>
    </section>

    <!-- Main content -->
    <section class="content container-fluid">

      <!--------------------------
        | Your Page Content Here |
        -------------------------->
        <form th:action="@{/role/addRole}" method="post" th:object="${role}">
        <div class="form-group">
                  <label>角色名称</label>
                  <input type="text" class="form-control" placeholder="Enter ..." name="name" th:value="${role.name}">
                  <p style="color: red;" th:if="${#fields.hasErrors('name')}" th:errors="*{name}">Error</p>
         </div>
    <H1>菜单</H1>
	<ul>
		<li  th:each="collect,iterStat : ${menuList}">
		<input type="checkbox" th:value="${collect.pid}" th:text="${collect.name}" name="menu"/>
          <ul>
           <li th:each="cht,iter : ${collect.chilrd}"> <input type="checkbox"  th:value="${cht.pid}" th:text="${cht.name}" name="menu"/></li>
          </ul>
        </li>
	</ul>
    <H1>功能</H1>
	<ul>
		<li  th:each="cel,tat : ${permissionList}">
		<input type="checkbox" th:value="${cel.pid}" th:text="${cel.name}" name ="permissi"/>
        </li>
	</ul>





<div class="box-footer">
                <button type="submit" class="btn btn-primary">添加</button>
</div>

</form>
    </section>
    <!-- /.content -->
  </div>
  <!-- /.content-wrapper -->

  <!-- Main Footer -->



  <div th:replace="footer::html" ></div>

  <div class="control-sidebar-bg"></div>
</div>

<div th:replace="bottom::html" ></div>
</body>
</html>